#include <graphics/IndexData.h>

namespace ne
{
    IndexData::IndexData(const PrimitiveType pt,
                         const uint32_t bufferSource,
                         const AttributeType type,
                         const uint32_t count,
                         const size_t offset)
        : mPrimitiveType(pt),
          mpAttribute(new VertexAttribute(bufferSource,
            VAS_INDEX, type, count, 0, offset, false))
    {
    }

    PrimitiveType IndexData::getPrimitiveType() const
    {
        return mPrimitiveType;
    }

    VertexAttributePtr IndexData::getAttribute() const
    {
        return mpAttribute;
    }

    uint32_t IndexData::getSource() const
    {
        return mpAttribute->getSource();
    }

    AttributeType IndexData::getType() const
    {
        return mpAttribute->getType();
    }

    uint32_t IndexData::getCount() const
    {
        return mpAttribute->getCount();
    }

    uint32_t IndexData::getSize() const
    {
        return mpAttribute->getSize();
    }

    GLDataType IndexData::getGLDataType() const
    {
        return mpAttribute->getGLDataType();
    }

    uint32_t IndexData::getAttributeSize() const
    {
        return mpAttribute->getAttributeSize();
    }

    size_t IndexData::getOffset() const
    {
        return mpAttribute->getOffset();
    }

    void* IndexData::getOffsetPointer() const
    {
        return mpAttribute->getOffsetPointer();
    }

    IndexData::~IndexData()
    {
    }
}
